package com.health.teahouse.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.health.common.annotation.Excel;
import com.health.common.core.domain.BaseEntity;

/**
 * 帖子信息对象 posts
 * 
 * @author yang
 * @date 2024-02-11
 */
public class Posts extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 帖子ID，自增主键 */
    private Long postId;

    /** 关联的用户ID */
    @Excel(name = "关联的用户ID")
    private Long userId;

    private String userName;

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    private Long status;

    @Override
    public String toString() {
        return "Posts{" +
                "postId=" + postId +
                ", userId=" + userId +
                ", userName='" + userName + '\'' +
                ", status=" + status +
                ", likes=" + likes +
                ", postTitle='" + postTitle + '\'' +
                ", postContent='" + postContent + '\'' +
                ", createdAt=" + createdAt +
                ", updatedAt=" + updatedAt +
                '}';
    }

    public Long getLikes() {
        return likes;
    }

    public void setLikes(Long likes) {
        this.likes = likes;
    }

    private Long likes;
    public Long getStatus() {
        return status;
    }

    public void setStatus(Long status) {
        this.status = status;
    }

    /** 帖子标题 */
    @Excel(name = "帖子标题")
    private String postTitle;

    /** 帖子内容 */
    @Excel(name = "帖子内容")
    private String postContent;

    /** 帖子创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "帖子创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createdAt;

    /** 帖子更新时间 */
    private Date updatedAt;

    public void setPostId(Long postId) 
    {
        this.postId = postId;
    }

    public Long getPostId() 
    {
        return postId;
    }
    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }
    public void setPostTitle(String postTitle) 
    {
        this.postTitle = postTitle;
    }

    public String getPostTitle() 
    {
        return postTitle;
    }
    public void setPostContent(String postContent) 
    {
        this.postContent = postContent;
    }

    public String getPostContent() 
    {
        return postContent;
    }
    public void setCreatedAt(Date createdAt) 
    {
        this.createdAt = createdAt;
    }

    public Date getCreatedAt() 
    {
        return createdAt;
    }
    public void setUpdatedAt(Date updatedAt) 
    {
        this.updatedAt = updatedAt;
    }

    public Date getUpdatedAt() 
    {
        return updatedAt;
    }

}
